{{
group_menus = [
    ('dashboard', 'Dashboard', '/group/%s'),
    ('document', 'Document', '/group/%s/document'),
    ('task', 'Task', '/group/%s/task'),
    ('info', 'Info', '/group/%s/info'),
]
def group_menu(group_name, current='dashboard'):
    for id, caption, link in group_menus:
        link = link % group_name
        if id == current:
            out.write('<li class="active"><a href="%s">%s</a></li>' % (link, caption), escape=False)
        else:
            out.write('<li><a href="%s">%s</a></li>' % (link, caption), escape=False)
        pass
    pass
pass
}}